﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

public partial class MasterPage : System.Web.UI.MasterPage
{
    private SqlConnection cnn;
    private SqlCommand cmd;
    private String strSQL, strcnntring;
    private SqlDataAdapter daDanhmuc;
    private DataSet dsDanhmuc;

    protected void Page_Load(object sender, EventArgs e)
    {
        strcnntring = ConfigurationManager.ConnectionStrings["CSDL"].ConnectionString;
        cnn = new SqlConnection(strcnntring);
        strSQL = "select * from CATEGORY";
        daDanhmuc = new SqlDataAdapter(strSQL, cnn);
        dsDanhmuc = new DataSet();
        daDanhmuc.Fill(dsDanhmuc,"CATEGORY");
        ddl_danhmuc.DataSource = dsDanhmuc;
        ddl_danhmuc.DataBind();
    }
}
